fix(accordion): remove unintended clipboard copy on open#234
Open
20syldev wants to merge 1 commit intomintlify:mainfrom
Open
fix(accordion): remove unintended clipboard copy on open#23420syldev wants to merge 1 commit intomintlify:mainfrom
20syldev wants to merge 1 commit intomintlify:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #27 (reported on mintlify/mdx#27).
Clicking an accordion to expand/collapse it was silently overwriting the user's clipboard with the current URL + hash fragment. This behavior was unexpected and disruptive — especially when the user had something else copied.
copyToClipboard(newUrl)call inupdateAndCopycopyToClipboardimportwindow.history.replaceStateso deep-linking to open accordions continues to workNote
Low Risk
Removes an unintended clipboard write during accordion URL management; behavior change is limited to client-side UX and should not affect data or security.
Overview
Accordion URL management no longer copies the generated deep-link URL into the user’s clipboard when sections are opened/closed.
The unused
copyToClipboardimport is removed, and URL updates continue to happen viawindow.history.replaceStateso hash-based deep linking still works.Reviewed by Cursor Bugbot for commit 5dbca8c. Bugbot is set up for automated code reviews on this repo. Configure here.